<div class="ordersub"><script>
  function showOrHide(controlId, targetId){
	  //alert(controlId);
	  var control = $('#' +controlId).get(0);
	  var targetEdit = $('#' + targetId + 'Edit').get(0);
	  var targetView = $('#' + targetId + 'View').get(0);
	  //alert(control.innerHTML);
	  if(control.innerHTML == '[Edit]'){
		  control.innerHTML = '[Close]';
		  targetEdit.style.display = '';
		  targetView.style.display = 'none';
	  }else{
		  control.innerHTML = '[Edit]';
		  targetEdit.style.display = 'none';
		  targetView.style.display = '';
	  }
  }
</script>
<ul>
	<li>Shipping Address &nbsp;&nbsp;&nbsp;&nbsp;<a id="addressEdit"
		href="javascript: showOrHide('addressEdit', 'addressTable')">[Edit]</a></li>
	<li id="addressTableEdit" style="display: none">
	<table class="edit">
		<tr>
			<td width="100" align="right">First name:</td>
			<td width="100"><spring:bind path="order.shipToFirstName">
				<input type="text" name="<c:out value="${status.expression}"/>"
					value="<c:out value="${status.value}"/>" />
			</spring:bind></td>
			<td width="100" align="right">Last name:</td>
			<td width="100"><spring:bind path="order.shipToLastName">
				<input type="text" name="<c:out value="${status.expression}"/>"
					value="<c:out value="${status.value}"/>" />
			</spring:bind></td>
		</tr>
		<tr>
			<td align="right">Address :</td>
			<td colspan="3"><spring:bind path="order.shipAddress">
				<input type="text" name="<c:out value="${status.expression}"/>"
					value="<c:out value="${status.value}"/>" size="57"/>
			</spring:bind></td>
		</tr>
		<tr>
			<td align="right"></td>
			<td colspan="3"><spring:bind path="order.shipAddress2">
				<input type="text" name="<c:out value="${status.expression}"/>"
					value="<c:out value="${status.value}"/>" size="57"/>
			</spring:bind></td>
		</tr>
		<tr>
			<td align="right">Surburb :</td>
			<td><spring:bind path="order.shipSurburb">
				<input type="text" name="<c:out value="${status.expression}"/>"
					value="<c:out value="${status.value}"/>" />
			</spring:bind></td>
		</tr>
		<tr>
			<td align="right">State:</td>
			<td><spring:bind path="order.shipState">
				<input type="text" name="<c:out value="${status.expression}"/>"
					value="<c:out value="${status.value}"/>" />
			</spring:bind></td>
			<td align="right">Postcode:</td>
			<td><spring:bind path="order.shipZip">
				<input type="text" name="<c:out value="${status.expression}"/>"
					value="<c:out value="${status.value}"/>" />
			</spring:bind></td>
		</tr>
		<tr>
			<td align="right">City:</td>
			<td><spring:bind path="order.shipCity">
				<input type="text" name="<c:out value="${status.expression}"/>"
					value="<c:out value="${status.value}"/>" />
			</spring:bind></td>
			<td align="right">Country:</td>
			<td><spring:bind path="order.shipCountry">
				<input type="text" name="<c:out value="${status.expression}"/>"
					value="<c:out value="${status.value}"/>" />
			</spring:bind></td>
		</tr>
		<tr>
			<td align="right">Contact No:</td>
			<td><spring:bind path="order.shipPhone">
				<input type="text" name="<c:out value="${status.expression}"/>"
					value="<c:out value="${status.value}"/>" />
			</spring:bind></td>
		</tr>
		<tr>
			<td align="right">Email:</td>
			<td colspan="3" align="left"><spring:bind path="order.shipEmail">
				<input type="text" name="<c:out value="${status.expression}"/>"
					value="<c:out value="${status.value}"/>" size="57"/>
			</spring:bind></td>
		</tr>
	</table>
	</li>
	<li id="addressTableView" style="display: "></li>
</ul>
</div>